* {
  margin: 0;
  padding: 0;
}

body,
html {
  height: 100%;
}

.container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

header {
  height: 7vh;
  border-bottom: 2px solid #555;
  text-align: center;
  line-height: 7vh;
  font-size: 18px;
  font-weight: bold;
  position: relative;
}
header button{
    position: absolute;
    right: 20px;
    padding: 5px;
    top: 50%;
    transform: translateY(-50%);
  }
main {
  height: 85vh;
  padding: 10px;
  padding-bottom: 70px;
  overflow: auto;
}

main .join-tip {
  text-align: center;
  color: #999;
  margin: 5px;
}

main .mesItem {
  position: relative;
  display: flex;
  padding: 25px 0;
  color: #fff;
}

main .mesItem-me {
  position: relative;
  display: flex;
  padding: 25px 0;
  color: #fff;
  justify-content: flex-end;
}

main .nickname {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #999;
  text-align: center;
  line-height: 50px;
}
main .content {
  position: relative;
  padding: 0 10px;
  text-align: center;
  line-height: 50px;
  border-radius: 5px;
}

main p {
  color: gray;
  position: absolute;
  bottom: -5px;
}

main .mesItem .content {
  background-color: rgb(88, 179, 212);
  margin-left: 15px;
}

main .mesItem-me .content {
  background-color: rgb(21, 136, 21);
  margin-right: 15px;
}

main .mesItem .content::before {
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  height: 0;
  width: 0;
  content: "";
  border: 10px solid rgba(255, 255, 255, 0);
  border-top: 6px solid rgba(255, 255, 255, 0);
  border-bottom: 6px solid rgba(255, 255, 255, 0);
  border-right-color: rgb(88, 179, 212);
}

main .mesItem-me .content::before {
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  height: 0;
  width: 0;
  content: "";
  border: 10px solid rgba(255, 255, 255, 0);
  border-top: 6px solid rgba(255, 255, 255, 0);
  border-bottom: 6px solid rgba(255, 255, 255, 0);
  border-left-color: rgb(21, 136, 21);
}

footer {
  height: 8vh;
  width: 100%;
  display: flex;
  border-top: 1px solid #999;
  position: fixed;
  bottom: 0;
}
#messageInput {
  font-size: 18px;
  border: none;
  padding-left: 20px;
  outline: none;
  line-height: 8vh;
  width: 100%;
}
#send {
  width: 100px;
  cursor: pointer;
  background-color: aquamarine;
  border-top: 1px solid #999;
  font-size: 18px;
}

#modal {
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  position: fixed;
  display: none;
}

#modal .modal-content {
  border-radius: 5px;
  padding: 10px;
  background-color: #fff;
  border: 1px solid #555;
  height: 200px;
  width: 300px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#modal .modal-content h2 {
  text-align: center;
}

#modal .modal-content input {
  text-align: center;
  width: 100%;
  height: 40px;
  margin: 15px 0;
}

#modal .modal-content button {
  margin: 0 auto;
  display: block;
  background-color: aquamarine;
  border: 1px solid #eee;
  padding: 10px;
  font-size: 18px;
  cursor: pointer;
}
